//
//  LiveBroadcastListVC.m
//  ZhiBoYuan
//
//  Created by JW on 2018/4/17.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "LiveBroadcastListVC.h"

#import "LiveCourseListVC.h"


@interface LiveBroadcastListVC ()



@end

@implementation LiveBroadcastListVC

- (void)viewDidLoad {
    [super viewDidLoad];

    [self initWithViews];
}



- (void)initWithViews{
    NSArray *titles = @[@"正在直播",@"直播预告",@"直播回放"];
    NSMutableArray *arr = [NSMutableArray array];
    NSArray *liveType = @[@"zhibo",@"yugao",@"huifang"];
    for (int i = 0; i < 3; i++) {
        LiveCourseListVC *courseVC = [LiveCourseListVC new];
        courseVC.listType = liveType[i];
        [arr addObject:courseVC];
    }

    CKSlideMenu *slideMenu = [[CKSlideMenu alloc]initWithFrame:CGRectMake(0, 0,ScreenWidth, 45)  titles:titles controllers:arr];
    
    slideMenu.bodyFrame = CGRectMake(0,45,ScreenWidth,Screenheight- NAVIGATION_BAR_HEIGHT- TAB_BAR_HEIGHT-45);
    slideMenu.bodySuperView = self.view;
    slideMenu.indicatorOffsety = 2;
    slideMenu.indicatorWidth = ScreenWidth/3-2;
    
    slideMenu.font = [UIFont systemFontOfSize:17];
    slideMenu.titleStyle     = SlideMenuTitleStyleGradient;
    slideMenu.indicatorStyle = SlideMenuIndicatorStyleNormal;
    
    slideMenu.isFixed = YES;
    slideMenu.showLine = YES;
    
    slideMenu.selectedColor = ZhuTiColor;
    slideMenu.indicatorColor = ZhuTiColor;
    
    slideMenu.unselectedColor = [UIColor grayColor];
    [self.view addSubview:slideMenu];
}



@end
